# coding:utf-8
from functools import reduce

l1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]


def fun01(items):
    l = []
    for item in items:
        if item % 2 == 0:
            l.append(item)
    return l


l2 = fun01(l1)
print(l2)

l3 = list(map(lambda num: num * 2, l1))
print(l3)

l4 = reduce(lambda x, y: x + y, l1)
print(l4)

l5 = [item for item in filter(lambda num: num % 2 == 0, l1)]
print(l5)
l6 = list(filter(lambda num: num*2, l1))
print(l6)
